<template>
  <h2>{{  message }}</h2>

  <el-button type="primary" @click="changeMessage">点击显示</el-button>
</template>

<script setup>
  import { defineProps,defineEmits } from 'vue'
  const props = defineProps({
      message: String
  })

  const emit = defineEmits(['childMessage'])
  const changeMessage = () => {
    emit('childMessage', 'Hello from child')
  }
</script>

<style>

</style>